
from core.base import *

class SupplierModel:
	def __init__(self):
		self.name = 'Nissan Philippines'
		# This is a string to allow for leading zeroes
		self.contact_number = '123-45-67'
		self.country = 'Philippines'

	def get_name(self):
		return self.name

	def set_name(self, name):
		self.name = name

	def get_contact_number(self):
		return self.contact_number

	def set_contact_number(self, contact_number):
		self.contact_number = contact_number

	def get_country(self):
		return self.country

	def set_country(self, country):
		# TODO: Validate the country parameter
		self.country = country


class SupplierController(BaseController):
	def get_all(self):
		suppliers = []

		for i in range(0, 5):
			suppliers.append(SupplierModel())

		self.update_views(suppliers)
		return suppliers

	def get_supplier_of(self, item):
		return Supplier()

	def search_by_name(self, name):
		return []

